# Python 2.6.4
# Project Euler, Problem 99
# Copyright 2010 Talha Zaman

from math import log10
num = [x.strip().split(",") for x in open("base_exp.txt").readlines()]
highest, index = 0, -1
for i in range(len(num)):
    val = int(num[i][1]) * log10(int(num[i][0]))
    if highest < val: highest, index = val, i
print highest, index+1
